package cn.tedu.spring.security.controller;

import cn.tedu.spring.security.pojo.User;
import cn.tedu.spring.security.service.IUserService;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserController {

    @Autowired
    private IUserService userService;

    @GetMapping("/user")
    public List<User> getUsers(){
        List<User> users=userService.findAll();
        return users;
    }
}
